﻿//-----------------------------------------------------------------------------
// <copyright file="IViewModelActivator.cs" company="William E. Kempf">
//     Copyright (c) William E. Kempf.
// </copyright>
//-----------------------------------------------------------------------------

namespace Onyx.Windows
{
    using System;

    /// <summary>
    /// Defines an object that can create view model objects.
    /// </summary>
    /// <remarks>
    /// This abstraction provides a hook for using an IoC container to create the view model objects.
    /// </remarks>
    public interface IViewModelActivator
    {
        /// <summary>
        /// Creates the view model.
        /// </summary>
        /// <param name="viewModelType">Type of the view model.</param>
        /// <param name="view">The <see cref="View"/> to associate with the view model.</param>
        /// <returns>
        /// A new instance of <paramref name="viewModelType"/>.
        /// </returns>
        object CreateViewModel(Type viewModelType, View view);
    }
}
